<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        // Array2.length计算数组个数；Array2[下标]import数组元素；
        var Array2 = [33, 9889, 555, 44];
        var sum = 0;
        for (var i = 0; i < Array2.length; i++) {
            sum += Array2[i];
        }
        var average = sum / Array2.length;
        console.log(sum, average);
    </script>
</head>

<body>

</body>

</html>